from django.db import models
from utils.base_model import BaseModel


class ProjectModel(BaseModel):

    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=20, verbose_name="该名称", help_text="项目名称", unique=True)
    leader = models.CharField(max_length=20, verbose_name="项目领导", help_text="项目领导")
    developer = models.CharField(max_length=20, verbose_name="开发人员", help_text="开发人员", blank=True, null=True)
    tester = models.CharField(max_length=20, verbose_name="测试人员", help_text="测试人员", blank=True, null=True)
    description = models.TextField(max_length=100, verbose_name="项目描述", help_text="项目描述", blank=True, null=True)
    is_delete = models.IntegerField(verbose_name="逻辑删除(0-未删除、1-删除)", help_text="逻辑删除(0-未删除、1-删除)",
                                    default=0)

    class Meta:
        db_table = "dtp_project"
        verbose_name = "项目"
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.name
